﻿using System.Collections.Generic;

namespace dPet.Application.Services
{
	using dPet.Application.DataObjects;
	using dPet.Application.QueryObjects;
	using dPet.Infrastructure.Logging;

	public interface ISalesService
	{
		#region SaleOrder

		/// <summary>
		/// 创建销售订单
		/// </summary>
		MessagedResult<SaleOrderDto> CreateSaleOrder(string hospitalId, MembershipLevelDto membershipLevelDto, ShoppingCartItemDto[] items, IOperator @operator);

		/// <summary>
		/// 获取销售订单列表
		/// </summary>
		IEnumerable<SaleOrderDto> GetSaleOrders(string hospitalId, SaleOrderQueryDto queryDto, 
			int pageIndex, int pageSize, out int totalNumber);

		/// <summary>
		/// 获取销售订单
		/// </summary>
		SaleOrderDto GetSaleOrder(string orderId);

		/// <summary>
		/// 根据订单状态获取销售订单
		/// </summary>
		SaleOrderDto GetSaleOrder(string orderId, OrderStatusDto statusDto);

		/// <summary>
		/// 支付销售订单
		/// </summary>
		MessagedResult<bool> PaySaleOrder(string orderId, PaymentMethodDto paymentMethodDto, IOperator @operator);

		/// <summary>
		/// 取消销售订单
		/// </summary>
		MessagedResult<bool> CancelSaleOrder(string orderId, IOperator @operator);

		#endregion
	}
}
